#ifndef NAIGATIONSTYLE_H_H_H_H_
#define NAIGATIONSTYLE_H_H_H_H_
#include "view3DInventorViewer.h"

// class NavigationStyleEvent : public QEvent
// {
// public:
// 	NavigationStyleEvent(const
// };
class NavigationStyle : public Base::BaseClass
{
	TYPESYSTEM_HEADER();
public:
	NavigationStyle(void);
	~NavigationStyle(void);
public:
	enum ViewerMode
	{
		IDLE,
		INTERACT,
		ZOOMING,
		BOXZOON,
		PANNING,
		DRAGGING,
		SPINNING,
		SEEK_WAIT_MODE,
		SEEK_MODE,
		SELECTION
	};

	enum selectionMode
	{
		Lasso     = 0,
		Rectangle = 1,
		BoxZoom   = 2,
		Clip      = 3,
	};

	void setViewer(view3DInventorViewer*);

	void setViewingMode(const ViewerMode newmode);
	int getViewingMode()const;

	void zoom(CKCamera* camera,float diffvalue);
	void pan(CKCamera* camera);

	virtual bool processEvent(QEvent* e);

	void setPopupMenuEnabled(bool bl);

	bool isPopupMenuEnabled()const;

	void openPopupMenu(/*QPoint*/);



protected:

	view3DInventorViewer* viewer;
	ViewerMode currentmode;
    Vx2DVector lastmouseposition;
	bool ctrldown, shiftdown, altdown,ctrl_alt_down;
	bool button1down, button2down, button3down;
	bool key_W_Down,key_S_down,key_A_Down,key_D_Down;
};

class UserNavigationStyle : public NavigationStyle
{
	TYPESYSTEM_HEADER();
public:
	UserNavigationStyle(){}
	virtual ~UserNavigationStyle(){}

	virtual const char* mouseButtons(ViewerMode) = 0;
};

class CADNavigationStyle : public UserNavigationStyle
{
	TYPESYSTEM_HEADER();
public:
	CADNavigationStyle();
	~CADNavigationStyle();
	const char* mouseButtons(ViewerMode);

protected:
	bool processEvent(QEvent* e);

private:

	bool lookButton1;
};
#endif